//
//  UIImage+category.h
//  jobClient
//
//  Created by 一览ios on 16/10/17.
//  Copyright © 2016年 YL1001. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIImage (category)

//UIColor -> UIImage
+ (UIImage*) createImageWithColor: (UIColor*) color;

// UIView转UIImage
+ (UIImage *)imageWithView:(UIView *)view;

// Label转Image
+ (UIImage *)imageWithLabelText:(NSString *)text font:(UIFont *)font backgroundColor:(UIColor *)backgroundColor textColor:(UIColor *)textColor cornerRadius:(CGFloat)cornerRadius height:(CGFloat)height;

+ (UIImage *)imageWithLabelText:(NSString *)text font:(UIFont *)font backgroundColor:(UIColor *)backgroundColor textColor:(UIColor *)textColor borderColor:(UIColor *)borderColor borderWidth:(CGFloat)borderWidth cornerRadius:(CGFloat)cornerRadius height:(CGFloat)height;

// 高斯模糊
+ (UIImage *)blurryImage:(UIImage *)image withBlurLevel:(CGFloat)blur;

+ (UIImage *)blurryWithView:(UIView *)view blurLevel:(CGFloat)blur;

- (UIImage *)blurryWithBlurLevel:(CGFloat)blur;

#pragma mark - 压缩图片大小（压缩质量）
- (NSData *)compressQualityWithMaxLength:(NSInteger)maxLength;

- (NSData *)compressToMaxDataSizeKBytes:(CGFloat)size;

@end
